﻿@model Sispe.Entities.PERSONA

@{
    ViewBag.Title = "Datos de Persona";
}

<link rel="stylesheet" href="~/Content/bootstrap.min.css">
<link rel="stylesheet" href="~/Content/themes/base/jquery-ui.css">
<script src="~/Scripts/jquery-1.10.2.js"></script>
<script src="~/Scripts/jquery-ui.js"></script>


<script type="text/javascript">
    $(function () {
        $.datepicker.setDefaults($.datepicker.regional["es"]);
        $("#FechaNacimiento").datepicker({
            firstDay: 1,
            showButtonPanel: true
        });
    });
</script>


@using (Html.BeginForm("CreatePersona", "Trabajador")) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>PERSONA</legend>
        
        <div class="editor-label">
            DNI
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Dni)
            @Html.ValidationMessageFor(model => model.Dni)
        </div>

        <div class="editor-label">
            APE. MATERNO
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApePaterno)
            @Html.ValidationMessageFor(model => model.ApePaterno)
        </div>

        <div class="editor-label">
            APE. PATERNO
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApeMaterno)
            @Html.ValidationMessageFor(model => model.ApeMaterno)
        </div>

        <div class="editor-label">
            NOMBRES
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombres)
            @Html.ValidationMessageFor(model => model.Nombres)
        </div>

        <div class="editor-label">
            FECHA NACIMIENTO
        </div>
        <div class="editor-field">
            @Html.Editor("FechaNacimiento")
        </div>

        <div class="editor-label">
            SEXO
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdSexo")
        </div>

        <div class="editor-label">
            ESTADO CIVIL
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdEstadoCivil")
        </div>
        
        <div class="editor-label">
            EMAIL
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            DIRECCIÓN
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Direccion)
            @Html.ValidationMessageFor(model => model.Direccion)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<a href="@Url.Action("Create", "Trabajador")">
        <img src="@Url.Content("~/Images/add.png")" title="Registro de Trabajador" />Registrar Trabajador</a>

